Feature/export references #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces new functionality for exporting file references and refactors existing methods to improve code clarity and efficiency. The changes include updates to backend services, database mappers, and frontend actions to support the export feature and streamline data retrieval.
Backend Changes
Export References Feature:
lib/Service/EthswarmService.php: Added a newexportReferencesmethod to retrieve file metadata from the database and format it for export.lib/Sabre/WebDavPlugin.php: Integrated theexportReferencesmethod into the HTTP POST handler to support the "export" action.Refactoring for Improved Data Retrieval:
lib/Db/SwarmFileMapper.php: IntroducedfindByFileIdand refactoredfindAlltofindAllByStorageIdfor more specific querying.lib/Service/EthswarmService.php: UpdatedgetTokento usefindByFileIdfor cleaner and more efficient data access.Frontend Changes
Export Action Implementation:
src/app/files/actions/export.js: Added a new file action to export references, including UI integration and backend communication.src/util/FilesHelper.js: Added adownloadFileutility method to facilitate file downloads in the export action.